<script src="jquery.js"></script>
<meta charset="utf-8" />

<form>
    <input placeholder="新密码" id="newPwd" />
    <input type="button" value="设置" onclick="setNewPwd()" />
</form>
<script>
    function setNewPwd(){
        $.post("http://localhost/shop/updateuserpwd",
            {phone:localStorage.getItem("currentPhone")
            ,newPwd:newPwd.value},function(data){
          if(data=="Saved"){
              alert("修改密码成功！");
          }
        });
    }
</script>